package lecture06.personprivate;

/*
* 创建实体类student,包含属性:姓名,年龄,学号
* 创建成员方法:study()
* 创建实体类s1("ln",18,"888")
* 输出其姓名和年龄调用study()
* */

class Student {
    String name;
     int age;
    String id;
    public void study() {
        System.out.println(name + "今年" + age);

    }

}

public class StudentInf {
    static void main() {
        Student s1 = new Student();
        s1.name = "ln";
        s1.age = 18;
        s1.id = "123";
        s1.study();
    }

}
